package com.oamicnet.servicetwo.server.controller;

import com.oamicnet.serviceone.api.OneApi;
import com.oamicnet.serviceone.api.teacher.TeacherApi;
import com.oamicnet.serviceone.api.teacher.vo.TeacherVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ApiController {

    @Autowired
    private OneApi oneApi;

    @Autowired
    private TeacherApi teacherApi;

    @GetMapping("/getServiceName")
    public String index() {
        return oneApi.getServiceName();
    }

    @GetMapping("/getTeahcerById")
    public TeacherVO getTeahcerById() {
        return teacherApi.getTeacherById(1L);
    }

}
